package net.lzzy.lxq.server;


import net.lzzy.lxq.dao.UserDeviceMapper;
import net.lzzy.lxq.entities.UserDevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserDeviceService {
    @Autowired
    UserDeviceMapper mapper;
    public UserDevice getUserDeviceByDeviceId(String id){
        return mapper.getUserDeviceByDeviceId(id);
    }

    public UserDevice getUserDevice(String id){
        return mapper.getUserDevice(id);
    }
    /*public void bindDevice(String deviceId,String userId){
        mapper.bindDevice(deviceId, userId);
    }*/

    public List<UserDevice> getUserDevices(){
        return mapper.getUserDevices();
    }

    public void bindDevice(UserDevice device){
        mapper.bindDevice(device);
    }
}
